package com.ruoyi.system.api.factory;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.RemoteQYContactService;
import com.ruoyi.system.api.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * 企业微信登录服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemoteQYContactFallbackFactory implements FallbackFactory<RemoteQYContactService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteQYContactFallbackFactory.class);

    @Override
    public RemoteQYContactService create(Throwable throwable)
    {
        log.error("企业微信联系人服务调用失败:{}", throwable.getMessage());
        return new RemoteQYContactService()
        {


            @Override
            public String sync_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String sync_apply_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String batch_get_userinfo(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String batch_get_corpinfo(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String update_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String search_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String add_search_wx_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String add_search_wx_work_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String add_card_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String add_wx_card_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String add_deleted_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String agree_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String delete_contact(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String get_contact_by_qrcode(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String op_black_list(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }
        };
    }
}
